package com.interview.common.exception;


import com.interview.common.constant.HttpStatus;

import java.io.Serial;

/**
 * @author zzw
 * @date 2025/5/31
 * @description 业务异常
 */
public class BusinessException extends RuntimeException {

    private final int code;

    @Serial
    private static final long serialVersionUID = 1L;

    public BusinessException(String msg) {
        super(msg);
        this.code = HttpStatus.FAIL;
    }

    public BusinessException(int code, String msg) {
        super(msg);
        this.code = code;
    }
}
